package com.ny.service.Impl;

import com.ny.entity.Classrooms;
import com.ny.mapper.ClassroomMapper;
import com.ny.service.ClassroomService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ClassroomServiceImpl implements ClassroomService {
    @Autowired
    private ClassroomMapper classroomMapper;
    @Override
    public List<Classrooms> findAllClassrooms() {
        return classroomMapper.findAllClassrooms();
    }


    //多条件查询教室
    @Override
    public List<Classrooms> searchClassrooms(String classroomName, String capacity, String status, String building, String description) {
        return classroomMapper.searchClassrooms(classroomName, capacity, status, building, description);
    }

    //根据教室 ID 更新教室状态
    @Override
    public void updateClassroomStatusById(int classroomId, String status) {
        classroomMapper.updateClassroomStatusById(classroomId, status);
    }




}
